package org.example.feign_client1.controller;

import org.example.feign_client1.client.UserInfoClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/hello")
@RestController
public class HelloController {

    @Autowired
    private UserInfoClient userInfoClient;

    @GetMapping("/hello")
    public String hello() {
        return "hello";
    }

    @GetMapping("/userInfo")
    public Object userInfo() {
        return userInfoClient.getBindUsers();
    }
}
